package cn.getech.data.development.service;

import cn.getech.data.development.entity.flink.BdpRealTableInfo;
import cn.getech.data.development.entity.permission.RealTablePermission;
import cn.getech.data.development.entity.permission.TenantRealTablePermission;
import cn.getech.data.development.model.req.search.DataSearchReq;
import cn.getech.data.development.model.vo.BdpRealTableInfoVO;
import cn.getech.data.development.vo.SecurityLevelVO;
import cn.getech.data.intelligence.common.utils.PageUtils;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface BdpRealTableInfoService extends IService<BdpRealTableInfo>{


    int save(BdpRealTableInfoVO param);

    PageUtils <BdpRealTableInfo>queryPage(DataSearchReq param);

    BdpRealTableInfoVO queryDetail(Integer id);

    PageUtils<RealTablePermission> listPageByRole(Map<String, Object> params);

    void savePermission(List<RealTablePermission> dataList);

    PageUtils<TenantRealTablePermission> listPageByTenant(Map<String, Object> params);

    void saveTenantPermission(List<TenantRealTablePermission> dataList);


    String checkPermission(BdpRealTableInfoVO id);

    Integer checkProjectRelation(Integer id);

    List<Map<String, Object>> getUserList(Integer type, Integer procId);

    SecurityLevelVO getDefaultSecurityDataLevel();

    /**
     * 初始化表表权限权限 当前登录用户创建的表和字段 默认初始化当前登录用户的第一个角色的权限
     */
    void initDataPermission(Integer tableId,Long roleId,Integer userId);
}